﻿using System;
using System.Threading;
using Microsoft.SharePoint.Administration;

namespace Codeplex.STSDTS.Services
{
    class Utils
    {

        public static void WaitOnSolutionJob(SPSolution solution)
        {
            while (solution.JobExists && (solution.JobStatus == SPRunningJobStatus.Initialized || solution.JobStatus == SPRunningJobStatus.Scheduled))
                Thread.Sleep(new TimeSpan(0, 0, 0, 5));
        }

    }
}